import 'dart:ui';

import 'package:flutter/material.dart';
import 'package:flutterdouban/pages/main/main.dart';
import 'package:flutterdouban/pages/share/app_theme.dart';
import 'package:flutterdouban/pages/share/size_fit.dart';
import 'package:flutterdouban/router/router.dart';
import 'package:flutterdouban/router/unknown.dart';
import 'package:flutterdouban/widgets/dashed_line.dart';
import 'package:flutterdouban/widgets/star_rating.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // 初始化适配器
    JKSizeFit.initialze();

    return MaterialApp(
      title: 'FlutterDemo',
      // 正常模式
      theme: JKAppTheme.normalTheme,
      // 暗黑模式
      darkTheme: JKAppTheme.darkTheme,
      // 启动要显示的界面
      // home: JKMainPage(),
      initialRoute: JKRouter.initialRoute,
      // 路由列表
      routes: JKRouter.routes,
      // 当routes里面找不到的时候，就会到这里根据名字找到对应的页面
      onGenerateRoute: JKRouter.generateRoute,
      // 路由占不到的错误界面
      onUnknownRoute: JKRouter.unknownRoute,
    );
  }
}


